﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace ThePushCSharp
{
    public class Terrain
    {
        public bool walkable;
        public int offenseMod;
        public int defenseMod;
        public int movementMod;
        public int visibilityMod;
        public int stealthMod;
        public String name;
        public String description;
        public Texture2D texture;

        public Terrain()
        {
            walkable = false;
            name = "None";
            description = "There is no terrain here!";
            offenseMod = 0;
            defenseMod = 0;
            movementMod = 0;
            visibilityMod = 0;
            stealthMod = 0;
        }
    }

    public class Grassland : Terrain
    {
        public Grassland(GameState game)
        {
            walkable = true;
            name = "Grassland";
            description = "The Grassland is a very neutral terrain, offering no benefit or penalty in any area.";
            offenseMod = 0;
            defenseMod = 0;
            movementMod = 0;
            visibilityMod = 0;
            stealthMod = 0;
            this.texture = game.push.Content.Load<Texture2D>("grassland");
        }
    }

    public class Beach : Terrain
    {
        public Beach(GameState game)
        {
            walkable = true;
            name = "Beach";
            description = "The Beach is difficult to move on, but does not effect any other area.";
            offenseMod = 0;
            defenseMod = 0;
            movementMod = -1;
            visibilityMod = 0;
            stealthMod = 0;
            this.texture = game.push.Content.Load<Texture2D>("beach");
        }
    }

    public class Forest : Terrain
    {
        public Forest(GameState game)
        {
            name = "Forest";
            description = "The Forest offers a big combat bonus in addition to concealing your troops from distant enemies.";
            offenseMod = 1;
            defenseMod = 1;
            movementMod = -1;
            visibilityMod = -1;
            stealthMod = 1;
            this.texture = game.push.Content.Load<Texture2D>("forest");
        }
    }

    public class Rocks : Terrain
    {
        public Rocks(GameState game)
        {
            walkable = true;
            name = "Rocks";
            description = "The Rocks provide a defensive bonus but lowers your visibility.";
            offenseMod = 0;
            defenseMod = 1;
            movementMod = 0;
            visibilityMod = -1;
            stealthMod = 0;
            this.texture = game.push.Content.Load<Texture2D>("rocks");
        }
    }

    public class Rise : Terrain
    {
        public Rise(GameState game)
        {
            walkable = true;
            name = "Rise";
            description = "The Rise gives your troops much greater visibility while on this terrain.";
            offenseMod = 0;
            defenseMod = 1;
            movementMod = 0;
            visibilityMod = 2;
            stealthMod = 0;
            this.texture = game.push.Content.Load<Texture2D>("rise");
        }
    }

    public class Ditch : Terrain
    {
        public Ditch(GameState game)
        {
            walkable = true;
            name = "Ditch";
            description = "The Ditch is a terrible place to be!  You have trouble seeing or fighting while in a Ditch.";
            offenseMod = -1;
            defenseMod = -1;
            movementMod = 0;
            visibilityMod = -1;
            stealthMod = 0;
            this.texture = game.push.Content.Load<Texture2D>("ditch");
        }
    }

    public class Water : Terrain
    {
        public Water(GameState game)
        {
            walkable = false;
            name = "Water";
            description = "You cannot walk on Water!";
            offenseMod = -1;
            defenseMod = -1;
            movementMod = -1;
            visibilityMod = -1;
            stealthMod = 0;
            this.texture = game.push.Content.Load<Texture2D>("water");
        }
    }
}
